/*****************************************************************************//*!
* file  : uni page.c
* creat : apleilx
* data  : 2017/11/05
*******************************************************************************/
#include "os_obj.h"
#include "lcd_xh.h"
#include "gui_main.h"

void lcd_xh_alain_utf8_puts(int16_t x, int16_t y, const char *str, uint16_t mode);

static uint8_t uni_txt_site;
static uint16_t site_keep_time;

void page_uni_disp_update(void)
{
	if(gui_st.page_now != gui_st.page_old)
	{
		uni_txt_site = 0;
	}
	
	if(gui_st.pulse.pulse_500ms)
		site_keep_time++;
	
	if(site_keep_time >= 6)
	{
		site_keep_time = 0;
		uni_txt_site ++;
	}

	lcd_xh_space_set(1);
	lcd_xh_font_set(16, 16, lcd_xh_font_8_16);
	
	lcd_xh_alain_utf8_puts(160,10,"<<UNICODE DISPLAY>>",TEXT_X_MID | TEXT_SQ(1,5,1)|TEXT_LINE(1,2)); 
	
	switch(uni_txt_site)
	{
		case 0:
			lcd_xh_anti();
			lcd_xh_square_fill(0,50,319,239);
			lcd_xh_normal();
		
			lcd_xh_alain_utf8_puts(160,50,"--千重雪 染蒹葭--",TEXT_X_MID | TEXT_SQ(0,5,3)|TEXT_LINE(1,0)); 
			lcd_xh_alain_utf8_puts(160,90,"--谁 眉间砂--",TEXT_X_MID | TEXT_SQ(0,5,3)|TEXT_LINE(1,0)); 
			lcd_xh_alain_utf8_puts(160,130,"--步步生莲花--",TEXT_X_MID | TEXT_SQ(0,5,3)|TEXT_LINE(1,0));
			break;
		case 1:
			lcd_xh_anti();
			lcd_xh_square_fill(0,90,319,239);
			lcd_xh_normal();
			lcd_xh_alain_utf8_puts(160,50,"--我们原是自由飞翔的鸟儿--",TEXT_X_MID | TEXT_SQ(0,5,3)|TEXT_LINE(1,0)); 
			lcd_xh_alain_utf8_puts(160,80,"--飞去吧--",TEXT_X_MID | TEXT_SQ(0,5,3)|TEXT_LINE(1,0)); 
			lcd_xh_alain_utf8_puts(160,110,"--飞到那乌云背后明媚的山峦--",TEXT_X_MID | TEXT_SQ(0,5,3)|TEXT_LINE(1,0));
			lcd_xh_alain_utf8_puts(160,140,"--飞到那里 到那蓝色的海角--",TEXT_X_MID | TEXT_SQ(0,5,3)|TEXT_LINE(1,0));
			lcd_xh_alain_utf8_puts(160,170,"--只有风在欢舞--",TEXT_X_MID | TEXT_SQ(0,5,3)|TEXT_LINE(1,0));
			lcd_xh_alain_utf8_puts(160,200,"--还有我作伴--",TEXT_X_MID | TEXT_SQ(0,5,3)|TEXT_LINE(1,0));
			break;
		case 2:
			lcd_xh_anti();
			lcd_xh_square_fill(0,50,319,239);
			lcd_xh_normal();
			lcd_xh_alain_utf8_puts(160,50,"--大风起兮云飞扬--",TEXT_X_MID | TEXT_SQ(0,5,3)|TEXT_LINE(1,0)); 
			lcd_xh_alain_utf8_puts(160,100,"--威加海内兮守四方--",TEXT_X_MID | TEXT_SQ(0,5,3)|TEXT_LINE(1,0)); 
			lcd_xh_alain_utf8_puts(160,150,"--安得猛士兮归故乡--",TEXT_X_MID | TEXT_SQ(0,5,3)|TEXT_LINE(1,0));
			break;
		default:
			uni_txt_site = 0;
	}		
}


